<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/detail-add.php");
?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="../asset/css/employee.css" rel="stylesheet" type="text/css"/>
    <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
</head>


<body>

<div id="topbar">
    <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>






        <div id="content">
            <?php $page_title='新增员工';?>
            <?php include ROOT_PATH_.'/controller/common/module/mod-page-title.php'; ?>

   



<div class="shrinker">
 1.新增员工后产生工号，登陆账号默认为工号。
</div>

<form id="add-employee-form" method="post"
      action="detail-add-function.php?sys_part=employee"
      enctype="multipart/form-data" class="layui-form detail-box">

    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">基本信息</li>
            <li>其他信息</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

            <div class="layui-form-item photo">
                <label class="layui-form-label">头像：</label>

                <? if ($detail['photo']) { ?>
                    <img src="../../../../uploadfiles/<? echo $theme_folder ?>/<? echo $detail['photo'] ?>" width="100"
                        style="border:solid 1px #ececec; background-color:#ececec"/>
                <? } else {
                    echo "暂无资料";
                }
                ?>
            </div>

            <div class="layui-form-item layui-form-item photo">
            <label class="layui-form-label">上传文件：</label><input type="file" name="photo" onchange="fileChange(this);"/>
            <em class="explain">上传头像,建议尺寸300px*300px</em><br/><br/></div>    


                <div class="layui-form-item">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_name" lay-verify="required" placeholder="请输入名字" autocomplete="off" class="layui-input" value="">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">密码</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_password" lay-verify="required" class="layui-input" value="cd123">
                    </div>
                </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">性别</label>
                        <div class="layui-input-block">
                            <input type="radio" name="ai_gender" value="男" title="男" >
                            <input type="radio" name="ai_gender" value="女" title="女" >
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">电话</label>
                        <div class="layui-input-block">
                            <input type="text" name="ai_phone" placeholder="请输入电话" autocomplete="off" class="layui-input" value="">
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">入职日期</label>
                        <div class="layui-input-block">

                            <input type="text" name="ai_applydate" id="date" autocomplete="off" class="layui-input"  value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">离职日期</label>
                        <div class="layui-input-block">

                            <input type="text" name="ai_leavedate" id="date" autocomplete="off" class="layui-input"  value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
                        </div>
                    </div>







                <!-- <div class="layui-form-item">-->
            <!--            <label class="layui-form-label">身份证地址</label>-->
            <!--            <div class="layui-input-block">-->
            <!--                <input type="text" name="ai_idaddress" placeholder="" autocomplete="off" class="layui-input" value="">-->
            <!--            </div>-->
            <!--        </div> -->







                <?//
                $department_list=select_lines_all_items($table_Prefix."department","nid desc","","0");
                ?>

                <div class="layui-form-item">
                    <label class="layui-form-label">部门</label>
                    <div class="layui-input-block">
                        <select name="ai_departmentid" >
                                <option value="">无</option>
                            <?for($i=0;$i<count($department_list);$i++){?>
                                <option value="<? echo $department_list[$i]['nid'] ?>"><? echo $department_list[$i]['name'] ?></option>
                            <? } ?>
                        </select>
                    </div>
                </div>



                    <div class="layui-form-item">
                        <label class="layui-form-label">岗位</label>
                        <div class="layui-input-block">
                            <input type="text" name="ai_position" placeholder="请输职员所在岗位" autocomplete="off" class="layui-input" value=" ">
                        </div>
                    </div>




                    <div class="layui-form-item">
                        <label class="layui-form-label">登陆权限</label>
                        <div class="layui-input-block">
                            <input type="radio" name="ai_authority" value="是" title="是" >
                            <input type="radio" name="ai_authority" value="否" title="否" >
                        </div>
                    </div>


                <? if(in_array("admin",$quanxian)){?>
                    <div class="layui-form-item">
                        <label class="layui-form-label">系统权限</label>
                        <div class="layui-input-block">


                            <input type="checkbox" name="ai_quanxian[]" value="admin" title="管理员"  >

                            <?foreach ($plate as $k=>$v) {
                                if($v['status']=='public'){?>
                                    <div>
                                        <input type="checkbox" name="ai_quanxian[]" value="<?echo $k?>" title="<?echo $v['name']?>"   >
                                        ：
                                        <?foreach ($v['permission'] as $k2=>$v2) {?>
                                            <input type="checkbox" name="ai_quanxian[]" value="<?echo $v2?>" title="<?echo str_replace($v['name']."_","",$v2)?>"   >
                                            <?;}?>

                                    </div>
                                <?}?>
                            <?}?>


                        </div>
                    </div>
                <?}?>


                <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                    <div class="layui-input-block">
                        <input type="radio" name="ai_status" value="在职" title="在职" >
                        <input type="radio" name="ai_status" value="辞职" title="辞职" >
                        <input type="radio" name="ai_status" value="辞退" title="辞退" >
                        <input type="radio" name="ai_status" value="休假" title="休假" >
            <!--                <input type="radio" name="ai_status" value="产假" title="产假" >-->
            <!--                <input type="radio" name="ai_status" value="带薪假期" title="带薪假期" >-->
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <label class="layui-form-label">身份证号码</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_idnumber" placeholder="请输职员身份证号码" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">生日日期</label>
                    <div class="layui-input-block">

                        <input type="text" name="ai_birthday" id="date" autocomplete="off" class="layui-input"  value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" class="laydate-icon">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">电话</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_phone" placeholder="请输职员电话" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">银行卡号</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_banknumber" placeholder="请输入职员银行卡号" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">开户行名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_bank" placeholder="请输职员银行卡号开户行名称" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">学历</label>
                    <div class="layui-input-block">
                        <select name="ai_education">
                            <option value="">无</option>
                            <option value="小学">小学</option>
                            <option value="初中">初中</option>
                            <option value="高中">高中</option>
                            <option value="大专">大专</option>
                            <option value="本科">本科</option>
                            <option value="硕士">硕士</option>
                            <option value="博士">博士</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">毕业院校</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_school" placeholder="请输职员毕业院校" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">专业</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_speciality" placeholder="请输职员所属专业" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">通讯地址</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_liveaddress" placeholder="请输职员通讯地址" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">紧急联系人</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_emergentname" placeholder="请输职员紧急联系人" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">紧急联系人电话</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_emergentphone" placeholder="请输职员紧急联系人电话" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">合同编号</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_contractnumber" placeholder="请输职员合同编号" autocomplete="off" class="layui-input" value=" ">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">合同开始时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_contractstartdate" id="date" autocomplete="off" class="layui-input"  value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">合同到期时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_contractenddate" id="date" autocomplete="off" class="layui-input"  value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">团体意外险购买时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_insurestartdate" id="date" autocomplete="off" class="layui-input"  value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">团体意外险停止时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_insureenddate" id="date" autocomplete="off" class="layui-input"  value="" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
                    </div>
                </div>
            </div>
        </div>
    </div>



<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">工资</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" name="ai_salary" placeholder="请输入基本工资" autocomplete="off" class="layui-input" value=" ">-->
<!--            </div>-->
<!--        </div>-->


        <input name="sys_part" type="hidden" value="<? echo $system_part ?>"/>
        <input name="nowpageid" type="hidden" value="<? echo $_REQUEST['nowpageid'] ?>"/>
        <input name="sortby" type="hidden" value="<? echo $_REQUEST['sortby'] ?>"/>









    <div class="function">
      <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>

</form>





        </div>



<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>








<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?> </body>
</html>

